<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width, initial-scale=1.0">
	    <link rel="stylesheet" href="css/nav.css">
	    <link rel="stylesheet" href="bootstrap-3.3.5/css/bootstrap.css">
		<title>管理员管理新用户界面</title>
		<link rel="stylesheet" type="text/css" href="css/new_person.css" />
		<link href="css/index.css" rel="stylesheet" type="text/cssxx" /> 
		<script type="text/javascript" src="js/jquery.1.4.2-min.js"></script>
		<script type="text/javascript" src="js/Calculation.js"></script>
<!--		<script language="JavaScript" src="js/new_person.js"></script>	-->	
		<nav class="top">
		    <button id="user"><a href="#" style="text-decoration: none;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-user greyColor"></span></a></button>	
			<span style="color: #3c3c3c;">喵，请管理员添加新成员</span>			
			<span class="pull-right">
				<a href="#"><span class="glyphicon glyphicon-hand-right pinkColor"></span></a>
				<button><a href="index_admin.html" >返回</a></button>
			</span>
		</nav>
    </head>
    <style>
	    .stcc1{
	     	width: 600px;
	     	height: 420px;
	        margin: auto;
	     	background-color: #bebebe;
	      
	    }
    	.form-group{
    		font-family:"微软雅黑";
    		font-size: 17px;
    		margin-left: 15px;
    		width: 300px;
    		height: 50px;
    	}
    	.hide1{
    		font-family:"微软雅黑";
    		font-size: 16px;
    		float: left;
    		margin-top: 10px;
    	}
    	.hide2{
    		width: 300px;
    		height: 80px;
    		margin-left: 220px;
    		margin-top: 80px;
    		float: left;
    		
    	}
    	.gstc_tb1{
    		margin-top: 10px;
    		width: 220px;
    		height: 20px;
    		margin-left: 28px;
  
    	}
    	.gstc_tb2{    		
    		margin-left: 28px;
    		margin-top: 3px;
    		width: 220px;
    		height: 20px;
    
    	}
    	.gtb2_td2{
    		margin-left: 10px;
    		font-family:"微软雅黑";
    		font-size: 18px;
    	}
    	.gtb2_td1{
    		width: 100px;
    	}
    	#ss{
    		display: block;
    		margin-left: 1px;
    	
    		
    	}
    	#ss a{
    		font-size: 17px;
    	}
        .hidely{
        	width: 300px;
            height: 200px;
            margin-top: 10px;
            
        }
    </style>
    
    <script>
	function add_admin(){
		window.open("ad_admin_increase.html","_blank","top=40px,left=80,width=1100,height=600,menubar=no,toolbar=no,scrollbars=yes")
		 
	}
    </script>
    
<body>
<div class="stcz">
	<p style="text-align: center;font-size: 25px;margin-top: 1px;margin-bottom: 30px;padding-top:36px;font-family: arial;">管理员请选择操作对象</p>
	<div class="stcc1">
		<table cellpadding="0" cellspacing="0">
			<form class="form-inline">
			<div class="form-group">
					</br>	
				<input name="choose" value="0" type="radio" id="adminId" checked="checked" /> 工号：
				<input name="choose" value="1" type="radio" id="adminName" /> 姓名：	</br>		</br>
				<input type="text" class="form-control444" id="inputValue" placeholder="请输入值">
				<button type="button" class="search6" id="exampleInputSearch" onclick="Search6()">查询</button><hr>
			</div>
		<!--	<script>
		
				$(document).ready(function(e) {
				    $(".search6").click(function(e) {
				        $(".hide2").toggle();
				    });
				});
	
			</script>-->
			<div class="hidely" >
				<div class="hide2"  style="display: none;" >
					查询不到相关信息！
				</div>
				<div class="hide1"  >
					<table cellpadding="0" cellspacing="0" class="gstc_tb1" style="display: none;">
					<tr>
						<td class="gtb1_td1">姓名</td>
						<td class="gtb1_td2">操作</td>
					
					</tr>
				    </table>
				    <table cellpadding="0" cellspacing="0" class="gstc_tb2"  style="display: none;">
						<tr>
							<td class="gtb2_td1"></td>
							<td class="gtb2_td2"><span id="ss"><a href="ad_admin_modify.html">修改/</a><a class="mod" href="">删除</a></span></td>
	                         <script type="text/javascript">
					        $(function(){
					            $('.mod').click(function(){
					            	
										var my=confirm("确定删除吗");
									    if(my==true)
									    {  alert("已删除");   }
									    else
									    {  alert("已取消");   }
					            })
					        })
				    </script>
						</tr>
				    </table>
				
				</div>
				
			<td class="#"><button style="border: solid;border-color: #9E9E9E;border-radius: 8px;width: 140px;height: 30px;margin-left: 660px;margin-top: 0px;" onClick="add_admin()">新增</button></td>
			</br>
			</br>
	
				
			</div>
			
			<script>
			
			$(document).ready(function(e) {
				    $(".search6").click(function(e) {
				    	var a=document.getElementById("inputValue").value;
				    	if(a!="110"){
				    		  $(".hide2").toggle();
				    	}
				      else{
				      	 $(".gstc_tb2").toggle();
				      	 $(".gstc_tb1").toggle();
				      }
				     
				    });
				});
	
			
				$("#exampleInputSearch").click(function(){
		          $.ajax({
		                type: "get",
		                url: "gh.json",
		                dataType: "json",
		                data: {
							adminId: $('form input[type=text]').val(),
							adminName: $('form input[type=text]').val(),
					    },
					    error : function() {
					    alert('请求失败 ');
				        },
		　　　　　　　　　       success: function(result){
		                addBox(result);
		                }
		            });
		        });
        function addBox(result){
                //result是一个集合,所以需要先遍历
	            $.each(result,function(index,obj){
	                $(".gtb2_td1").append(obj['adminName']);
	            });
        }
			</script>
			
			
			
			
			
		</form>
		</table>	
	</div> 
</div>
</body>
</html>
